home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 2002-10-03 | 56.8 KB | 1,189 lines
iiiillllLLLLiiiinnnnkkkk((((3333)))) IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll iiiillllLLLLiiiinnnnkkkk((((3333)))) NNNNAAAAMMMMEEEE iiiillllLLLLiiiinnnnkkkk - base class abstraction for object chaining IIIINNNNHHHHEEEERRRRIIIITTTTSSSS FFFFRRRROOOOMMMM This is a base class and therefore has no inheritance. HHHHEEEEAAAADDDDEEEERRRR FFFFIIIILLLLEEEE #include <il/ilLink.h> CCCCLLLLAAAASSSSSSSS DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN ilLink is the base class that implements the ImageVision Library (IL) chaining model. The ilLink class defines the mechanism for chaining objects together; objects are linked in a forward (child) or back (parent) relation. Allowing for such relations allows IL to specify image objects as inputs or outputs to other objects. All IL image objects are indirectly derived from ilLink. The ilLink base class implements the IL chaining model by defining the parent and child lists and the necessary functions to manage the lists. Additionally, ilLink provides a mechanism for managing the state and status of an ilLink. Additionally, ilLink implements state functions for controlling attribute changes. An enumerated list _i_l_L_i_n_k_P_a_r_a_m is defined by ilLink as a list of attributes it can control. Classes that derive from ilLink can add their attributes to the _i_l_L_i_n_k_P_a_r_a_m list to be handled by ilLink. ilLink provides functions to control whether an attribute can be modified as well has functions for querying if an attribute has been modified. The protected functions sssseeeettttAAAAlllltttteeeerrrreeeedddd(), iiiissssAAAAlllltttteeeerrrreeeedddd(), rrrreeeesssseeeettttAAAAlllltttteeeerrrreeeedddd(), ddddiiiissssaaaabbbblllleeeeAAAAlllltttteeeerrrreeeedddd() and aaaannnnyyyyAAAAlllltttteeeerrrreeeedddd() control whether an attribute has changed or not. ilLink provides additional protected functions to control whether an attribute is allowed to be modified or not: sssseeeettttAAAAlllllllloooowwwweeeedddd(), cccclllleeeeaaaarrrrAAAAlllllllloooowwwweeeedddd(), uuuunnnnaaaalllltttteeeerrrreeeeaaaabbbblllleeee(). UUUUssssiiiinnnngggg iiiillllLLLLiiiinnnnkkkk ilLink is a base class used for chaining other ilLink derived objects. It is intended to be used as a base class for deriving new types of chainable objects. The ilLink class provides protected and public member functions. The protected functions can only be called from a derived class. They may be used, for example, to query or set its state and status. The public functions can be called from either a derived class or an application program. The public functions are used to manage the parent and child links of the ilLink object. DDDDeeeeffffiiiinnnniiiinnnngggg aaaannnndddd aaaacccccccceeeessssssssiiiinnnngggg oooobbbbjjjjeeeecccctttt ddddeeeessssccccrrrriiiippppttttiiiioooonnnnssss PPPPaaaaggggeeee 1111 iiiillllLLLLiiiinnnnkkkk((((3333)))) IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll iiiillllLLLLiiiinnnnkkkk((((3333)))) Methods are provided to obtain the class and base class names of objects derived from ilLink. There are also methods to get and set a description string for objects derived from ilLink. Finally, there is a default description string for a particular subclass that is used when no description string has been explicitly set. If you wish to take advantage of this feature when creating a new subclass somewhere in the hierarchy derived from ilLink, then it is necessary to specify the values returned by these virtual methods. Two macros are provided to simplify this task: iiiillllCCCCllllaaaassssssssLLLLiiiissssttttDDDDeeeeccccllllaaaarrrreeee and iiiillllCCCCllllaaaassssssssLLLLiiiissssttttIIIImmmmpppplllleeeemmmmeeeennnnttttDDDDeeeerrrriiiivvvveeeedddd. Here is an example of how these two macros are used: class ilAddImg : public ilDyadicImg { // put this macro in the class declaration ilClassListDeclare // rest of declaration ... }; . . . // put this macro in the class implementation ilClassListImplementDerived(ilAddImg,ilDyadicImg,"Add") The first macro has no arguments and simply declares the relevant virtual methods for the new class. The second macro implements the relevent virtual methods and so should appear in the class implementation section of your code at global scope (i.e. not within a function or method). It has three arguments: the class name, the immediate base class name, and the default description string enclosed in double quotes. UUUUssssiiiinnnngggg pppprrrrooooppppeeeerrrrttttiiiieeeessss Methods are provided to set and query property values by name on an object derived from ilLink. A property value can be an integer, a floating point number, or a pointer. The name is a character string. This feature enables one to tag objects with arbitrary attributes. There are three scope levels provided for setting and querying property values: the object instance, the object class, and a global scope. When retrieving a property value, more than one scope can be specified. If so, then each of the specified scopes is searched in this order: the object instance scope, then the object class scope, then the global scope. PPPPaaaaggggeeee 2222 iiiillllLLLLiiiinnnnkkkk((((3333)))) IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll iiiillllLLLLiiiinnnnkkkk((((3333)))) CCCCLLLLAAAASSSSSSSS MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN SSSSUUUUMMMMMMMMAAAARRRRYYYY CCCCoooonnnnssssttttrrrruuuuccccttttoooorrrr ilLink() MMMMaaaannnnaaaaggggiiiinnnngggg tttthhhheeee PPPPaaaarrrreeeennnntttt aaaannnndddd CCCChhhhiiiilllldddd rrrreeeellllaaaattttiiiioooonnnnssss int getNumParents() ilLink* getDirectParent(int index=0) ilLink* getParent(int index=0) ilStatus setParent(ilLink* parent, int idx = 0) ilStatus removeParent(int idx = 0) int getNumChildren() void setEnabled(int enable=TRUE) int isEnabled() void setDisabledIndex(int parentIndex=0) int getDisabledIndex() void clearSet(int mask) int getMaxIndex(ilStatus val) _p_r_o_t_e_c_t_e_d int getMinIndex(ilStatus val) _p_r_o_t_e_c_t_e_d ilLink* getRelatedChild(int type) int getRelatedType() void setRelatedType(int rtype, int ignoreDisable=FALSE) int getRelatedDelete() void setRelatedDelete(int del) void deleteRelated(int force=TRUE) _p_r_o_t_e_c_t_e_d static int newRelatedType(char* className=NULL) int isRelated() MMMMaaaannnnaaaaggggiiiinnnngggg ssssttttaaaatttteeee virtual void reset() _p_r_o_t_e_c_t_e_d void resetCheck() _p_r_o_t_e_c_t_e_d virtual void alterAction() _p_r_o_t_e_c_t_e_d ilStatus setAltered(int mask=ilLPgeneric) _p_r_o_t_e_c_t_e_d int isAltered(int mask) int anyAltered() _p_r_o_t_e_c_t_e_d void disableAltered() _p_r_o_t_e_c_t_e_d void resetAltered() _p_r_o_t_e_c_t_e_d void setPropAltered(iflName* propName) _p_r_o_t_e_c_t_e_d int isSet(int mask) void markSet(int mask) _p_r_o_t_e_c_t_e_d void isAllowed(int mask) void setAllowed(int mask) _p_r_o_t_e_c_t_e_d void clearAllowed(int mask) _p_r_o_t_e_c_t_e_d int unalterable(int mask) _p_r_o_t_e_c_t_e_d int neverReset() _p_r_o_t_e_c_t_e_d int inProgress() _p_r_o_t_e_c_t_e_d ilStatus getStatus() void clearStatus() PPPPaaaaggggeeee 3333 iiiillllLLLLiiiinnnnkkkk((((3333)))) IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll iiiillllLLLLiiiinnnnkkkk((((3333)))) ilStatus setStatus(ilStatus val) _p_r_o_t_e_c_t_e_d void watch(ilWatchedObject* object) _p_r_o_t_e_c_t_e_d void stopWatching(ilWatchedObject* object) _p_r_o_t_e_c_t_e_d virtual void watchNotify(ilWatchReason reason, ilWatchedObject* object) _p_r_o_t_e_c_t_e_d unsigned int getGenerationID() AAAAcccccccceeeessssssssiiiinnnngggg oooobbbbjjjjeeeecccctttt ddddeeeessssccccrrrriiiippppttttiiiioooonnnnssss char* getDescription(int ignoreDefault=FALSE) ilStatus setDescription(char* desc, ilScope scope=ilInstanceScope) AAAAcccccccceeeessssssssiiiinnnngggg oooobbbbjjjjeeeecccctttt pppprrrrooooppppeeeerrrrttttyyyy lllliiiissssttttssss int getIntProp(char* s, ilScope scope=ilInstanceScope) float getFloatProp(char* s, ilScope scope=ilInstanceScope) void* getPtrProp(char* s, ilScope scope=ilInstanceScope) ilProperty* getProp(char* s, ilScope scope=ilInstanceScope) ilProperty* getProp(illName* n, ilScope scope=ilInstanceScope) ilStatus setProp(char* s, int i, ilScope scope=ilInstanceScope) ilStatus setProp(char* s, float f, ilScope scope=ilInstanceScope) ilStatus setProp(char* s, void* p, ilScope scope=ilInstanceScope) ilStatus removeProp(char* s, ilScope scope=ilInstanceScope) ilPropSet* getClassPropSet() ilPropSet* getPropSet() HHHHaaaarrrrddddwwwwaaaarrrreeee hhhhiiiinnnntttt mmmmaaaannnnaaaaggggeeeemmmmeeeennnntttt ilStatus setHwHint(ilHwHint* hint, int adopt=FALSE) ilStatus setHwIntHint(int hintID, int val) ilStatus setHwIntHint(const char* hintName, int val) const ilHwHint* getHwHint(int hintID) const ilHwHint* getHwHint(const char* hintName) int getHwIntHint(int hintID, int& val) int getHwIntHint(const char* hintName, int& val) ilStatus removeHwHint(int hintID) ilStatus removeHwHint(const char* hintName) MMMMuuuullllttttiiii----tttthhhhrrrreeeeaaaadddd ccccoooonnnnttttrrrroooollll void mpLock(int spins=ilSpinLock::defaultSpinCount) _p_r_o_t_e_c_t_e_d void mpUnlock() _p_r_o_t_e_c_t_e_d DDDDeeeebbbbuuuuggggggggiiiinnnngggg aaaannnndddd mmmmoooonnnniiiittttoooorrrriiiinnnngggg static void addResetCallback(ilCallback* cb, int autoDelete=FALSE) static ilStatus removeResetCallback(ilCallback* cb) static int hasResetCallbacks() void dumpChain() PPPPaaaaggggeeee 4444 iiiillllLLLLiiiinnnnkkkk((((3333)))) IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll iiiillllLLLLiiiinnnnkkkk((((3333)))) FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNNSSSS iiiillllLLLLiiiinnnnkkkk(((()))) ilLink() The constructor handles all necessary initialization of the chain list and object state. aaaaddddddddRRRReeeesssseeeettttCCCCaaaallllllllbbbbaaaacccckkkk(((()))) static void addResetCallback(ilCallback* cb, int autoDelete=FALSE) This function is used to add a reset callback. The ccccbbbb parameter should an object declared with one of the templates ilResetMethodCallback (for a callback method) or ilResetFunctionCallback (for a callback function.) Either type of callback will have a prototype of: void func(usrArgType userArg, ilResetCbArg* resetArg) The _u_s_e_r_A_r_g parameter (defined when the callback is declared) is intended to provide context for the callback and is not referenced by the library. When a callback is invoked, the _r_e_s_e_t_A_r_g parameter will contain a pointer to this ilLink object (member _l_i_n_k) and a reason code (member _s_t_a_t_e), defining why the reset occured: '_i' The object is being initialized (first call to reset after construction). '_a' The object is being altered. '_d' The object is being deleted. A new reset callback to a member function might look something like: void Bar::resetSeen(Foo*, ilResetCbArg*) { ... } typedef ilResetMethodCallback<Bar,Foo*> UserResetCallback; Bar bar; Foo foo; UserResetCallback resetCb(&bar, Bar::resetSeen, &foo); ilLink::addResetCallback(&resetCb); In this example, _F_o_o is assumed to be a class defining contextual information to the callback. PPPPaaaaggggeeee 5555 iiiillllLLLLiiiinnnnkkkk((((3333)))) IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll iiiillllLLLLiiiinnnnkkkk((((3333)))) Note that there is one global list of callbacks for all ilLink objects (since aaaaddddddddRRRReeeesssseeeettttCCCCaaaallllllllbbbbaaaacccckkkk() is a static member function). aaaalllltttteeeerrrrAAAAccccttttiiiioooonnnn(((()))) virtual void alterAction() _p_r_o_t_e_c_t_e_d This virtual is called when an object is first marked altered after a reset. It can be defined to handle special circumstances (like recovering memory in ilMemCacheImg) but most users should use the rrrreeeesssseeeetttt() virtual to handle alterations to an object. aaaannnnyyyyAAAAlllltttteeeerrrreeeedddd(((()))) int anyAltered() _p_r_o_t_e_c_t_e_d Returns TRUE if any _i_l_L_i_n_k_P_a_r_a_m has been set in the _a_l_t_e_r_e_d data member. cccclllleeeeaaaarrrrAAAAlllllllloooowwwweeeedddd(((()))) void clearAllowed(int mask) _p_r_o_t_e_c_t_e_d Sets the _i_l_L_i_n_k_P_a_r_a_m specified by _m_a_s_k to be a value that cannot be altered. cccclllleeeeaaaarrrrSSSSeeeetttt(((()))) void clearSet(int mask) Resets a predefined parameter by the specified _m_a_s_k. cccclllleeeeaaaarrrrSSSSttttaaaattttuuuussss(((()))) void clearStatus() Clears the status returned by ggggeeeettttSSSSttttaaaattttuuuussss(((()))) to ilOKAY. ddddeeeelllleeeetttteeeeRRRReeeellllaaaatttteeeedddd(((()))) void deleteRelated(int force=TRUE) This method is called when an object is deleted with _f_o_r_c_e TRUE to delete all related children. In reset it is called with _f_o_r_c_e FALSE to delete only related children with the related delete flag set. In some cases it is important that derived clases call PPPPaaaaggggeeee 6666 iiiillllLLLLiiiinnnnkkkk((((3333)))) IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll iiiillllLLLLiiiinnnnkkkk((((3333)))) ddddeeeelllleeeetttteeeeRRRReeeellllaaaatttteeeedddd() in their desctructor to clean up any related children before parents of that type are themselves torn down. ddddiiiissssaaaabbbblllleeeeAAAAlllltttteeeerrrreeeedddd(((()))) void disableAltered() _p_r_o_t_e_c_t_e_d Disables the _a_l_t_e_r_e_d data member by logically OR'ing _i_l_L_P_i_n_P_r_o_g_r_e_s_s parameter to the _a_l_t_e_r_e_d data member. dddduuuummmmppppCCCChhhhaaaaiiiinnnn(((()))) void dumpChain() Prints a description of the chain of links to _s_t_d_o_u_t. The description strings of this _i_l_L_i_n_k object and all of its children are printed, one per line, with indentation to indicate increasing depth. The hex address of each node is also displayed. Returns the name of the object's class as a character string. The _p_a_r_e_n_t_I_d_x parameter allows the name of a parent class to be retrieved; it's value specifies the number of hops up the inheritance chain. A value of zero (the default) fetches this class's name, a value of one returns the immediate parent class's name, and so on. ggggeeeettttCCCCllllaaaassssssssPPPPrrrrooooppppSSSSeeeetttt(((()))) ilPropSet* getClassPropSet() Return a pointer to the property set associated with the object's class. ggggeeeettttDDDDeeeessssccccrrrriiiippppttttiiiioooonnnn(((()))) char* getDescription(int ignoreDefault=FALSE) Returns the object's description string. If no description string has been defined (by sssseeeettttDDDDeeeessssccccrrrriiiippppttttiiiioooonnnn), then the default description string is returned unless the flag _i_g_n_o_r_e_D_e_f_a_u_l_t is _T_R_U_E in which case _N_U_L_L is returned. ggggeeeettttDDDDiiiirrrreeeeccccttttPPPPaaaarrrreeeennnntttt(((()))) ilLink* getDirectParent(int index=0) PPPPaaaaggggeeee 7777 iiiillllLLLLiiiinnnnkkkk((((3333)))) IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll iiiillllLLLLiiiinnnnkkkk((((3333)))) Returns a pointer to the ilLink at index _i_n_d_e_x in the parent list, even if that parent has been disabled with setEnabled(FALSE). NULL is returned if there is no ilLink at the specified index. See ggggeeeettttPPPPaaaarrrreeeennnntttt(). The default index is 0. ggggeeeettttDDDDiiiissssaaaabbbblllleeeeddddIIIInnnnddddeeeexxxx(((()))) int getDisabledIndex() Returns the index of the parent to be used in place of this object when it is disabled. See sssseeeettttDDDDiiiissssaaaabbbblllleeeeddddIIIInnnnddddeeeexxxx(), iiiissssEEEEnnnnaaaabbbblllleeeedddd() and sssseeeettttEEEEnnnnaaaabbbblllleeeedddd(). ggggeeeettttFFFFllllooooaaaattttPPPPrrrroooopppp(((()))) float getFloatProp(char* s, ilScope scope=ilInstanceScope) Return the float property value associated with the string _s or _0 if no such property has been defined. The _s_c_o_p_e argument specifies the search range for property lookup. See the explanation of _s_c_o_p_e under ggggeeeettttIIIInnnnttttPPPPrrrroooopppp(). The default value for _s_c_o_p_e is _i_l_I_n_s_t_a_n_c_e_S_c_o_p_e. ggggeeeettttGGGGeeeennnneeeerrrraaaattttiiiioooonnnnIIIIDDDD(((()))) unsigned int getGenerationID() Returns the ID of _o_b_j. The ID is a number unique across all instantiated objects derived from ilLink. The ID changes every time the object is altered, so it may be used for an inexpensive check of whether an object has changed. ggggeeeettttHHHHwwwwHHHHiiiinnnntttt(((()))) const ilHwHint* getHwHint(int hintID) const ilHwHint* getHwHint(const char* hintName) int getHwIntHint(int hintID, int& val) int getHwIntHint(const char* hintName, int& val) This function returns a pointer to the ilHwHint associated with either the given _h_i_n_t_I_D or _h_i_n_t_N_a_m_e. If the requested hint has not been set on this object (using sssseeeettttHHHHwwwwHHHHiiiinnnntttt()), then the global hints are searched for this hint. If the hint has also not been set globally, then this method returns NULL. The ggggeeeettttHHHHwwwwIIIInnnnttttHHHHiiiinnnntttt() methods provide a simpler interface to access integer hints that were previously set using sssseeeettttHHHHwwwwIIIInnnnttttHHHHiiiinnnntttt() or iiiillllHHHHwwwwSSSSeeeettttGGGGlllloooobbbbaaaallllIIIInnnnttttHHHHiiiinnnntttt(). The ggggeeeettttHHHHwwwwIIIInnnnttttHHHHiiiinnnntttt() methods return _T_R_U_E if the hint is defined, and sets the integer pointed-to by the _v_a_l parameter to the hint value if it is defined. The contents of _v_a_l are unchanged if the hint is PPPPaaaaggggeeee 8888 iiiillllLLLLiiiinnnnkkkk((((3333)))) IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll iiiillllLLLLiiiinnnnkkkk((((3333)))) undefined. See iiiillllHHHHwwwwHHHHiiiinnnntttt((((3333)))) for specific information on IL- recognized hints. ggggeeeettttIIIInnnnttttPPPPrrrroooopppp(((()))) int getIntProp(char* s, ilScope scope=ilInstanceScope) Return the integer property value associated with the string _s or _0 if no such property has been defined. The _s_c_o_p_e argument specifies the search range for property lookup. It can be any logically OR'ed combination of _i_l_I_n_s_t_a_n_c_e_S_c_o_p_e, _i_l_C_l_a_s_s_S_c_o_p_e, and _i_l_G_l_o_b_a_l_S_c_o_p_e. If _i_l_I_n_s_t_a_n_c_e_S_c_o_p_e is specified, then the object's property set is searched. If _i_l_C_l_a_s_s_S_c_o_p_e is specified, then the object's class property set is searched. Finally, if _i_l_G_l_o_b_a_l_S_c_o_p_e is specified, then the global property set is searched. If more than one of of the search scopes is specified, then each of the specified scopes is searched in this order: the object instance scope, then the object class scope, then the global scope. The default value for _s_c_o_p_e is _i_l_I_n_s_t_a_n_c_e_S_c_o_p_e. ggggeeeettttMMMMaaaaxxxxIIIInnnnddddeeeexxxx(((()))) int getMaxIndex() _p_r_o_t_e_c_t_e_d Returns the highest index value in the parent list. ggggeeeettttMMMMiiiinnnnIIIInnnnddddeeeexxxx(((()))) int getMinIndex() _p_r_o_t_e_c_t_e_d Returns the lowest index value in the parent list. ggggeeeettttNNNNuuuummmmCCCChhhhiiiillllddddrrrreeeennnn(((()))) int getNumChildren() Returns the length of the children list. ggggeeeettttNNNNuuuummmmPPPPaaaarrrreeeennnnttttssss(((()))) int getNumParents() Returns the length of the parent list. PPPPaaaaggggeeee 9999 iiiillllLLLLiiiinnnnkkkk((((3333)))) IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll iiiillllLLLLiiiinnnnkkkk((((3333)))) ggggeeeettttPPPPaaaarrrreeeennnntttt(((()))) ilLink* getParent(int index=0) Returns a pointer to the ilLink at index _i_n_d_e_x in the parent list. NULL is returned if there is no ilLink at the specified index. If the selected parent of this object has been disabled with setEnabled(FALSE), the actual parent returned will be the parent's parent designated with sssseeeettttDDDDiiiissssaaaabbbblllleeeeddddIIIInnnnddddeeeexxxx(). If that grandparent is also disabled the process will be repeated until an enabled (great- ...)great-grandparent is found or there are no more ancestors, in which case NULL is returned. See sssseeeettttEEEEnnnnaaaabbbblllleeeedddd() and sssseeeettttDDDDiiiissssaaaabbbblllleeeeddddIIIInnnnddddeeeexxxx(). The default index is 0. ggggeeeettttPPPPrrrroooopppp(((()))) ilProperty* getProp(char* s, ilScope scope=ilInstanceScope) ilProperty* getProp(illName* n, ilScope scope=ilInstanceScope) Return the property associated with the string _s or _N_U_L_L if no such property has been defined. The second version expects an iiiillllllllNNNNaaaammmmeeee pointer rather than a character string as the search key. It is more efficient to look-up a property by iiiillllllllNNNNaaaammmmeeee pointer than by a string because hashing is avoided. The _s_c_o_p_e argument specifies the search range for property lookup. See the explanation of _s_c_o_p_e under ggggeeeettttIIIInnnnttttPPPPrrrroooopppp(). The default value for _s_c_o_p_e is _i_l_I_n_s_t_a_n_c_e_S_c_o_p_e. ggggeeeettttPPPPrrrrooooppppSSSSeeeetttt(((()))) ilPropSet* getPropSet() Return a pointer to the object's property set. ggggeeeettttPPPPttttrrrrPPPPrrrroooopppp(((()))) void* getPtrProp(char* s, ilScope scope=ilInstanceScope) Return the pointer property value associated with the string _s or _N_U_L_L if no such property has been defined. The _s_c_o_p_e argument specifies the search range for property lookup. See the explanation of _s_c_o_p_e under ggggeeeettttIIIInnnnttttPPPPrrrroooopppp(). The default value for _s_c_o_p_e is _i_l_I_n_s_t_a_n_c_e_S_c_o_p_e. ggggeeeettttRRRReeeellllaaaatttteeeeddddCCCChhhhiiiilllldddd(((()))) PPPPaaaaggggeeee 11110000 iiiillllLLLLiiiinnnnkkkk((((3333)))) IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll iiiillllLLLLiiiinnnnkkkk((((3333)))) ilLink* getRelatedChild(int type) Returns a pointer to the child with the indicated related type, if any, or NULL otherwise. See nnnneeeewwwwRRRReeeellllaaaatttteeeeddddTTTTyyyyppppeeee() for more details on related types. ggggeeeettttRRRReeeellllaaaatttteeeeddddDDDDeeeelllleeeetttteeee(((()))) int getRelatedDelete() Returns TRUE if and only if this image has been marked as a related child to be deleted automatically when the parent is reset. See nnnneeeewwwwRRRReeeellllaaaatttteeeeddddTTTTyyyyppppeeee() for more details on related types. ggggeeeettttRRRReeeellllaaaatttteeeeddddTTTTyyyyppppeeee(((()))) int getRelatedType() Returns the related type of this image or zero if the image is not a related child. See nnnneeeewwwwRRRReeeellllaaaatttteeeeddddTTTTyyyyppppeeee() for more details on related types. ggggeeeettttSSSSttttaaaattttuuuussss(((()))) ilStatus getStatus() Returns the value of the status data member. The possible constants that can be returned are defined in the <_i_l/_i_l_E_r_r_o_r._h> header file. hhhhaaaassssRRRReeeesssseeeettttCCCCaaaallllllllbbbbaaaacccckkkkssss(((()))) static int hasResetCallbacks() Returns TRUE if any reset callbacks have been defined with aaaaddddddddRRRReeeesssseeeettttCCCCaaaallllllllbbbbaaaacccckkkk(). iiiinnnnPPPPrrrrooooggggrrrreeeessssssss(((()))) int inProgress() _p_r_o_t_e_c_t_e_d Returns TRUE if the _i_l_L_i_n_k_P_a_r_a_m value, _i_l_L_P_i_n_P_r_o_g_r_e_s_s, is set. iiiissssAAAAlllllllloooowwwweeeedddd(((()))) PPPPaaaaggggeeee 11111111 iiiillllLLLLiiiinnnnkkkk((((3333)))) IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll iiiillllLLLLiiiinnnnkkkk((((3333)))) int isAllowed(int mask) Returns TRUE if the parameter _m_a_s_k is set in the _a_l_l_o_w_e_d data member. The parameter, _m_a_s_k, must be a valid ilLinkParam value, as defined in the header file <_i_l/_i_l_L_i_n_k._h>. iiiissssAAAAlllltttteeeerrrreeeedddd(((()))) int isAltered(int mask) Returns TRUE if the parameter _m_a_s_k is set in the _a_l_t_e_r_e_d data member. The parameter, _m_a_s_k, must be a valid ilLinkParam value, as defined in the header file <_i_l/_i_l_L_i_n_k._h>. iiiissssEEEEnnnnaaaabbbblllleeeedddd(((()))) int isEnabled() Returns TRUE if this object is enabled (the default state), FALSE otherwise. See sssseeeettttEEEEnnnnaaaabbbblllleeeedddd() for details on what it means to be enabled or disabled. iiiissssRRRReeeellllaaaatttteeeedddd(((()))) int isRelated() Returns FALSE if the object is not related; TRUE otherwise. iiiissssSSSSeeeetttt(((()))) int isSet(int mask) Returns TRUE if the _i_l_L_i_n_k_P_a_r_a_m specified by _m_a_s_k has been previously set. mmmmaaaarrrrkkkkSSSSeeeetttt(((()))) void markSet(int mask) _p_r_o_t_e_c_t_e_d Updates the state to recognize that the _i_l_L_i_n_k_P_a_r_a_m specified by _m_a_s_k has been set. mmmmppppLLLLoooocccckkkk(((()))) PPPPaaaaggggeeee 11112222 iiiillllLLLLiiiinnnnkkkk((((3333)))) IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll iiiillllLLLLiiiinnnnkkkk((((3333)))) void mpLock(int spins=ilSpinLock::defaultSpinCount) _p_r_o_t_e_c_t_e_d Every ilLink derived object contains an ilSpinLock used to prevent reset from being called concurretnly. This spin lock can be used for other similar applications by calling this function. The _s_p_i_n_s parameter is passed on to the sssseeeetttt() function of ilSpinLock. See the iiiillllSSSSppppiiiinnnnLLLLoooocccckkkk man page for more details. mmmmppppUUUUnnnnlllloooocccckkkk(((()))) void mpUnlock() _p_r_o_t_e_c_t_e_d This function is used to unlock the lock set with mmmmppppLLLLoooocccckkkk(). nnnneeeewwwwRRRReeeellllaaaatttteeeeddddTTTTyyyyppppeeee(((()))) static int newRelatedType(char* className=NULL) Gets a new related type code for the class of related child defined by _c_l_a_s_s_N_a_m_e. A related child is an image that is closely associated with its parent image, and is automatically deleted when its parent is deleted. If the delete related flag is set (see sssseeeettttRRRReeeellllaaaatttteeeeddddDDDDeeeelllleeeetttteeee then the related child will be delete on parent reset as well. Related children are primarily used by the hardware acceleration code but can be useful for other purposes. See also ddddeeeelllleeeetttteeeeRRRReeeellllaaaatttteeeedddd(). nnnneeeevvvveeeerrrrRRRReeeesssseeeetttt(((()))) int neverReset() _p_r_o_t_e_c_t_e_d Returns TRUE if the object has not yet been reset; FALSE if it has been reset since its construction. rrrreeeemmmmoooovvvveeeeHHHHwwwwHHHHiiiinnnntttt(((()))) ilStatus removeHwHint(int hintID) ilStatus removeHwHint(const char* hintName) This method removes the hardware hint associated with the given hintID or hintName. rrrreeeemmmmoooovvvveeeePPPPaaaarrrreeeennnntttt(((()))) ilStatus removeParent(int index=0) PPPPaaaaggggeeee 11113333 iiiillllLLLLiiiinnnnkkkk((((3333)))) IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll iiiillllLLLLiiiinnnnkkkk((((3333)))) This function removes the ilLink indexed by _i_n_d_e_x and marks this IilLink objects's state as _a_l_t_e_r_e_d. rrrreeeemmmmoooovvvveeeePPPPrrrroooopppp(((()))) ilStatus removeProp(char* s, ilScope scope=ilInstanceScope) ilStatus removeProp(illName* n, ilScope scope=ilInstanceScope) Remove the property associated with the string _s from the specified property set. The second version expects an iiiillllllllNNNNaaaammmmeeee pointer rather than a character string as the search key. It is more efficient to remove a property by iiiillllllllNNNNaaaammmmeeee pointer than by a string because hashing is avoided. The _s_c_o_p_e argument selects the property set from which the property is removed. See the explanation of _s_c_o_p_e under sssseeeettttPPPPrrrroooopppp(). The default value for _s_c_o_p_e is _i_l_I_n_s_t_a_n_c_e_S_c_o_p_e. The object is not marked altered as a result of rrrreeeemmmmoooovvvveeeePPPPrrrroooopppp(). rrrreeeemmmmoooovvvveeeeRRRReeeesssseeeettttCCCCaaaallllllllbbbbaaaacccckkkk(((()))) static ilStatus removeResetCallback(ilCallback* cb) This function removes a reset callback previously defined with aaaaddddddddRRRReeeesssseeeettttCCCCaaaallllllllbbbbaaaacccckkkk(). rrrreeeesssseeeetttt(((()))) virtual void reset() _p_r_o_t_e_c_t_e_d This function should be redefined by the derived class to handle alterations. The alterations will typically be triggered when either the parent or child list have been modified. rrrreeeesssseeeettttAAAAlllltttteeeerrrreeeedddd(((()))) void resetAltered() _p_r_o_t_e_c_t_e_d Resets the _a_l_t_e_r_e_d data member to zero. rrrreeeesssseeeettttCCCChhhheeeecccckkkk(((()))) void resetCheck() _p_r_o_t_e_c_t_e_d Invokes the reset() method if the altered state is set. sssseeeettttAAAAlllllllloooowwwweeeedddd(((()))) PPPPaaaaggggeeee 11114444 iiiillllLLLLiiiinnnnkkkk((((3333)))) IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll iiiillllLLLLiiiinnnnkkkk((((3333)))) void setAllowed(int mask) _p_r_o_t_e_c_t_e_d Updates the state to allow the _i_l_L_i_n_k_P_a_r_a_m specified by _m_a_s_k to be modified. sssseeeettttAAAAlllltttteeeerrrreeeedddd(((()))) ilStatus setAltered(int mask=ilLPgeneric) _p_r_o_t_e_c_t_e_d Sets the altered data member to _m_a_s_k. The default is _i_l_L_P_g_e_n_e_r_i_c. sssseeeettttDDDDeeeessssccccrrrriiiippppttttiiiioooonnnn(((()))) ilStatus setDescription(char* desc, ilScope scope=ilInstanceScope) Set the object's description string to be that pointed to by _d_e_s_c. Later calls to ggggeeeettttDDDDeeeessssccccrrrriiiippppttttiiiioooonnnn() will return this string. The argument _s_c_o_p_e can have value _i_l_I_n_s_t_a_n_c_e_S_c_o_p_e or _i_l_C_l_a_s_s_S_c_o_p_e. In the former case, the description string applies to the object only. The default value for _s_c_o_p_e is _i_l_I_n_s_t_a_n_c_e_S_c_o_p_e. In the latter case, it applies to all objects of that class. This method returns _i_l_O_K_A_Y if the value of _s_c_o_p_e has value _i_l_I_n_s_t_a_n_c_e_S_c_o_p_e or _i_l_C_l_a_s_s_S_c_o_p_e and _i_l_U_N_S_U_P_P_O_R_T_E_D otherwise. The object is not marked altered as a result of sssseeeettttDDDDeeeessssccccrrrriiiippppttttiiiioooonnnn(). sssseeeettttDDDDiiiissssaaaabbbblllleeeeddddIIIInnnnddddeeeexxxx(((()))) void setDisabledIndex(int parentIndex=0) Sets the index of the parent to be used in place of this object, when it is disabled, to _p_a_r_e_n_t_I_n_d_e_x. The default of this index upon construction is zero. See ggggeeeettttDDDDiiiissssaaaabbbblllleeeeddddIIIInnnnddddeeeexxxx(), iiiissssEEEEnnnnaaaabbbblllleeeedddd() and sssseeeettttEEEEnnnnaaaabbbblllleeeedddd(). sssseeeettttEEEEnnnnaaaabbbblllleeeedddd(((()))) void setEnabled(int enable=TRUE) This function sets the enabled status of this object to _e_n_a_b_l_e. If _e_n_a_b_l_e is TRUE, then this object will participate normally in a chain of objects. If _e_n_a_b_l_e is FALSE, a chain with this object in it will behave as if the object were removed from the chain; this object's children's parents will appear to the parent of this object designated with sssseeeettttDDDDiiiissssaaaabbbblllleeeeddddIIIInnnnddddeeeexxxx(). A disabled object that is directly accessed (say via ccccooooppppyyyyTTTTiiiilllleeee(), will behave normally, only accesses through a child's ggggeeeettttPPPPaaaarrrreeeennnntttt() method are affected. Since ilView uses ggggeeeettttPPPPaaaarrrreeeennnntttt() to find its input, even the end of a chain PPPPaaaaggggeeee 11115555 iiiillllLLLLiiiinnnnkkkk((((3333)))) IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll iiiillllLLLLiiiinnnnkkkk((((3333)))) being displayed through ilDisplay/ilView can be successfuly disabled. The default enable state for a newly constucted object is TRUE. See sssseeeettttDDDDiiiissssaaaabbbblllleeeeddddIIIInnnnddddeeeexxxx(), ilDisplay and ilView. sssseeeettttHHHHwwwwHHHHiiiinnnntttt(((()))) ilStatus setHwHint(ilHwHint* hint, int adopt=FALSE) ilStatus setHwIntHint(int hintID, int val) ilStatus setHwIntHint(const char* hintName, int val) Set a hardware hint for this image. The adopt argument indicates whether this ilLink should adopt the responsibility for releasing the storage associated with the hint. If set to TRUE then the ilLink will ensure that the hint is deleted when no longer needed. The setHwIntHint methods provide a simpler interface to set integer- valued hints. Hints that are set in this manner are always adopted and managed internally. The hintID is a global identifier that is associated with the particular hint name. It can be found using the function ilHwFindHintID. sssseeeettttPPPPaaaarrrreeeennnntttt(((()))) ilStatus setParent(ilLink* parent, int index) Replaces the ilLink at _i_n_d_e_x with _p_a_r_e_n_t and sets the state to _a_l_t_e_r_e_d. If _p_a_r_e_n_t already exists at _i_n_d_e_x, then ilOKAY is returned and the state is not altered. The default index is 0. sssseeeettttPPPPrrrroooopppp(((()))) ilStatus setProp(char* s, int i, ilScope scope=ilInstanceScope) ilStatus setProp(illName* n, int i, ilScope scope=ilInstanceScope) ilStatus setProp(char* s, float f, ilScope scope=ilInstanceScope) ilStatus setProp(illName* n, float f, ilScope scope=ilInstanceScope) ilStatus setProp(char* s, void* p, ilScope scope=ilInstanceScope) ilStatus setProp(illName* n, void* p, ilScope scope=ilInstanceScope) ilStatus setProp(char* s, const ilPropValue& val, ilScope scope=ilInstanceScope) ilStatus setProp(illName* n, const ilPropValue& val, ilScope scope=ilInstanceScope) Assign a property value associated with the string _s. Alternative versions expect an iiiillllllllNNNNaaaammmmeeee pointer rather than a character string as the search key. It is more efficient to set a property by iiiillllllllNNNNaaaammmmeeee pointer than by a string because hashing is avoided. See the iiiillllGGGGlllloooobbbbaaaallllNNNNaaaammmmeeee man page to find out how to obtain an iiiillllllllNNNNaaaammmmeeee pointer from a string. The property value can be an integer, a floating point number, or a pointer. It is also possible to provide an iiiillllPPPPrrrrooooppppVVVVaaaalllluuuueeee reference as the property value. The _s_c_o_p_e argument PPPPaaaaggggeeee 11116666 iiiillllLLLLiiiinnnnkkkk((((3333)))) IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll iiiillllLLLLiiiinnnnkkkk((((3333)))) selects the property set under which the property value is stored. It can be one of _i_l_I_n_s_t_a_n_c_e_S_c_o_p_e, _i_l_C_l_a_s_s_S_c_o_p_e, or _i_l_G_l_o_b_a_l_S_c_o_p_e. If _i_l_I_n_s_t_a_n_c_e_S_c_o_p_e is specified, then the object's property set is selected. If _i_l_C_l_a_s_s_S_c_o_p_e is specified, then the object's class property set is selected. Finally, if _i_l_G_l_o_b_a_l_S_c_o_p_e is specified, then the global property set is selected. The default value for _s_c_o_p_e is _i_l_I_n_s_t_a_n_c_e_S_c_o_p_e. The function returns _i_l_O_K_A_Y if _s_c_o_p_e is one of _i_l_I_n_s_t_a_n_c_e_S_c_o_p_e, _i_l_C_l_a_s_s_S_c_o_p_e, and _i_l_G_l_o_b_a_l_S_c_o_p_e. Otherwise, it returns _i_l_U_N_S_U_P_P_O_R_T_E_D. The object is not marked altered as a result of sssseeeettttPPPPrrrroooopppp(). sssseeeettttPPPPrrrrooooppppAAAAlllltttteeeerrrreeeedddd(((()))) void setPropAltered(iflName* propName) _p_r_o_t_e_c_t_e_d Sets all children (and descendants) that have the property defined and non-zero to be altered. This method is used by the ilHwHints mechanism to propagate hint change notifications to all objects that have been marked as being interested in hint changes. sssseeeettttRRRReeeellllaaaatttteeeeddddDDDDeeeelllleeeetttteeee(((()))) void setRelatedDelete(int del) Set the related child delete flag to _d_e_l. If the flag is set TRUE then this image will be deleted automatically when the parent is reset. See nnnneeeewwwwRRRReeeellllaaaatttteeeeddddTTTTyyyyppppeeee() for more details on related types. sssseeeettttRRRReeeellllaaaatttteeeeddddTTTTyyyyppppeeee(((()))) void setRelatedType(int rtype, int ignoreDisable=FALSE) Marks an image as related child of type _r_t_y_p_e. If _i_g_n_o_r_e_D_i_s_a_b_l_e is TRUE then the image will not pay attention to the disable status of its immediate parent, thus ensuring that it is only associated with that particular image. See nnnneeeewwwwRRRReeeellllaaaatttteeeeddddTTTTyyyyppppeeee() for more details on related types. sssseeeettttSSSSttttaaaattttuuuussss(((()))) ilStatus setStatus(ilStatus val) _p_r_o_t_e_c_t_e_d Sets the status returned by ggggeeeettttSSSSttttaaaattttuuuussss() to _v_a_l. Any constant that is used must be defined in the <_i_l/_i_l_E_r_r_o_r._h> header file. Any value other than ilOKAY is considered to be an error status. ssssttttooooppppWWWWaaaattttcccchhhhiiiinnnngggg(((()))) PPPPaaaaggggeeee 11117777 iiiillllLLLLiiiinnnnkkkk((((3333)))) IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll iiiillllLLLLiiiinnnnkkkk((((3333)))) void stopWatching(ilWatchedObject* object) _p_r_o_t_e_c_t_e_d Remove watch callback. uuuunnnnaaaalllltttteeeerrrraaaabbbblllleeee(((()))) int unalterable(int mask) _p_r_o_t_e_c_t_e_d Returns TRUE if the _i_l_L_i_n_k_P_a_r_a_m specified by _m_a_s_k cannot be altered. wwwwaaaattttcccchhhh(((()))) void watch(ilWatchedObject* object) _p_r_o_t_e_c_t_e_d Add watch callback. See the iiiillllWWWWaaaattttcccchhhheeeeddddOOOObbbbeeeecccctttt man page for a description of the alteration notifier. wwwwaaaattttcccchhhhNNNNoooottttiiiiffffyyyy(((()))) virtual void watchNotify(ilWatchReason reason, ilWatchedObject* object) _p_r_o_t_e_c_t_e_d This virtual method is called by watchCallback to allow derived classes to define a callback action. SSSSEEEEEEEE AAAALLLLSSSSOOOO ilImage, iflList, ilPropSet, ilWatchedObject, ilHwHint, <_i_l/_i_l_L_i_n_k._h>, <_i_l/_i_l_E_r_r_o_r._h>, <_i_l/_i_l_T_y_p_e_s._h> Please refer to the _I_m_a_g_e_V_i_s_i_o_n _L_i_b_r_a_r_y _P_r_o_g_r_a_m_m_i_n_g _G_u_i_d_e for a full description of overall concepts and architecture. PPPPaaaaggggeeee 11118888